import request from '@/utils/request'

/**
 * 朱财艺接口
 */

export function selectAllVehicleBaseInfo(data) {
  return request({
    url: '/manages/api/vehicle-info/selectAllVehicleBaseInfo/',
    method: 'get',
    data
  })
}


/**
 * 李新科接口
 * @param data
 * @returns {AxiosPromise}
 */

//updateUserReach 各种该状态
export function updateUserReach(data) {
  return request({
    url: '/vehice/tbl-order/updateUserReach/',
    method: 'post',
    data
  })
}

//redissonDriverPreempt  分布式锁
export function redissonDriverPreempt(data) {
  return request({
    url: '/vehice/tbl-order/redissonDriverPreempt/',
    method: 'post',
    data
  })
}


//http://localhost:9400/tbl-order/selectByDriverId/{driverId}
export function selectOrderByDriverId(driverId) {
  return request({
    url: '/vehice/tbl-order/selectOrderByDriverId/' + driverId,
    method: 'post',
  })
}

export function driverTakeOrder(data) {
  return request({
    url: '/vehice/tbl-order/driverTakeOrder',
    method: 'post',
    data
  })
}
/**
 * 根据城市编号和状态查询
 * @param cityCode
 * @returns {AxiosPromise}
 */
export function selectByCityCode(cityCode) {
  return request({
    url: '/vehice/tbl-order/selectByCityCode/' + cityCode,
    method: 'get',
  })
}

/**
 * 根据状态查询
 * @param data
 * @returns {*}
 */
export function selectAllByStatus(data) {
  return request({
    url: '/vehice/tbl-order/selectAllByStatus',
    method: 'get',
    data
  })
}

//redissonDriverPreempt

/**
 * 董曙榕接口
 * @param data
 * @returns
 */


//valuationOrderByNumber     计价
export function valuationOrderByNumber(data) {
  return request({
    url: '/driver/driver/valuationOrderByNumber',
    method: 'post',
    data
  })
}


//upLoadOcr  Ocr内容提取 http://localhost:9007/driver/upLoadOcr?imageUrl=
export function upLoadOcr(imageUrl) {
  return request({
    url: '/driver/driver/upLoadOcr?imageUrl=' + imageUrl,
    method: 'post',
  })
}



//优惠券下拉框
export function selectDiscountInfo(walletId) {
  return request({
    url: '/driver/driver/selectDiscountInfo/' + walletId,
    method: 'post',
  })
}
//钱包服务
export function selectWalletInfo(walletId) {
  return request({
    url: '/driver/driver/selectWalletInfo/' + walletId,
    method: 'post',
  })
}

//registerDriver  司机注册
export function registerDriver(data) {
  return request({
    url: '/driver/driver/registerDriver',
    method: 'post',
    data
  })
}


//queryDriverByIdCard  对司机进行唯一验证
export function queryDriverByIdCard(driverIdcard) {
  return request({
    url: '/driver/driver/queryDriverByIdCard/' + driverIdcard,
    method: 'post',
  })
}

// redisson锁抢单
export function driverPreemptOrder(data) {
  return request({
    url: '/driver/driver/driverPreemptOrder',
    method: 'post',
    data
  })
}


//根据审核状态查询司机集合  preemptOrder
export function queryDriverListByDriverId(driverId) {
  return request({
    url: '/driver/driver/queryDriverListByDriverId/' + driverId,
    method: 'post',
  })
}

export function preemptOrder(data) {
  return request({
    url: '/driver/driver/preemptOrder',
    method: 'post',
    data
  })
}

export function queryDriverByCheck(data) {
  return request({
    url: '/driver/driver/queryDriverByCheck',
    method: 'post',
    data
  })
}

//查询待审核司机
export function queryDriverByState(data) {
  return request({
    url: '/driver/driver/queryDriverByState',
    method: 'post',
    data
  })
}

//查看司机详情
export function selectDriverById(driverId) {
  return request({
    url: '/driver/driver/queryDriverList/' + driverId,
    method: 'post',
  })
}

//审核司机
export function updateDriverStateById(data) {
  return request({
    url: '/driver/driver/updateDriverStateById',
    method: 'post',
    data
  })
}

export function queryDriverList() {
  return request({
    url: '/driver/driver/queryDriverList',
    method: 'get',

  })
}
